home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 22 / 022.d81 / library manager (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1986-01-01  |  15.7 KB  |  585 lines

  1. 220 dim k1$(3) :rem keyword table
  2. 250 dim s3(75) : rem screen variable field table
  3. 280 dim ah$(500) : rem author table
  4. 310 rem
  5. 340 rem load screen matrix's
  6. 370 rem
  7. 400 read a : rem figure out how many screen tables
  8. 430 for m = 0 to a-1 : i=m*25 : read s3(i)
  9. 460 for p = 1tos3(i) : read s3(p+i) : next p
  10. 490 next m
  11. 520 at = 0 : rem prime for one time author table load
  12. 550 p1$="2":p2$="1":z$=","
  13. 580 goto 1870
  14. 610 rem
  15. 640 rem field filling subroutine
  16. 670 rem
  17. 700 bt=0:c1=1:r1=0:b$="": rem initialize back tab, row/column and buffer
  18. 730 gosub 1300 : rem tab to next field
  19. 760 gosub 1540 : rem read a character
  20. 790 if a$=chr$(13) then b$=b$+" ":goto 1180
  21. 820 if a$<> chr$(20) then goto 1000: rem check for delete key
  22. 850 if(c1=1 and r1=0)then 760:rem leave alone if at first position
  23. 880 b$=left$(b$,len(b$)-1) : rem shrink buffer by one
  24. 910 if c1=1 then r1=r1-1: c1=s3(q+2):bt=c1-1:gosub 1300:goto 760
  25. 940 c1 = c1 - 1 :bt=c1-1: rem back up one position if in middle
  26. 970 gosub 1300:goto 760 : delete previous except at beginning of field
  27. 1000 b$ = b$ + a$
  28. 1030 c1=c1+1 : rem bump col count
  29. 1060 if c1<= s3(q+2) goto 760 : rem check if end of columns
  30. 1090 r1=r1+1:c1=1:bt=0 : rem yes
  31. 1120 if r1< s3(q+3) then gosub 1300:goto 760 : rem if not last row tab
  32. 1150 if r1 < s3(q+3) then 760 : rem end of row/field? if not read more
  33. 1180 return
  34. 1210 rem
  35. 1240 rem tabbing subroutine
  36. 1270 rem
  37. 1300 print "";
  38. 1330 print tab(s3(q+1)+bt-1);
  39. 1360 for r3 = 1 to (s3(q)-1)+r1:print "";:next r3
  40. 1390 print chr$(18)" [157]"; :rem space for back tab
  41. 1420 return
  42. 1450 rem
  43. 1480 rem the following are keyboard read and cursor blink subroutines
  44. 1510 rem
  45. 1540 get a$:if a$ = "" then gosub 1720:goto 1540
  46. 1570 ifa$=","ora$=";"ora$=":"thena$=" " : rem purge input delimiters
  47. 1600 if(a$<" " or a$>"_")and (a$<> chr$(13) and a$<> chr$(20)) then a$=" "
  48. 1630 if a$<>chr$(13) and a$<>chr$(20) then print a$;:ps=1
  49. 1660 if f<3 and ps=1 then print "[157]";:ps=0
  50. 1690 return
  51. 1720 print chr$(146)" [157]";:forx=1to200:next
  52. 1750 print chr$(18)" [157]";:forx=1to200:next:return
  53. 1780 rem
  54. 1810 rem main menu
  55. 1840 rem
  56. 1870 f = 1 : rem set to form one
  57. 1900 poke 53280,7:poke 53281,2
  58. 1930 print "";"[147]";""
  59. 1960 print "  welcome to personal library manager!"
  60. 1990 print ""
  61. 2020 print "              do you want"
  62. 2050 print ""
  63. 2080 print "               to update"
  64. 2110 print ""
  65. 2140 print "                   or"
  66. 2170 print ""
  67. 2200 print "          retrieve abstracts?"
  68. 2230 print ""
  69. 2260 print "        type 'u' - update"
  70. 2290 print "             'r' - retrieve"
  71. 2320 print "             'h' - help"
  72. 2350 print "             'q' - quit"
  73. 2380 print  ""
  74. 2410 print "             -->[ ]<--";"[157][157][157][157][157]";
  75. 2440 gosub 1540
  76. 2470 if a$ = "q" then load"hello connect",8
  77. 2500 if a$ = "r" then gosub 5770
  78. 2530 if a$ = "u" then gosub 2740
  79. 2560 if a$ = "h" then gosub 16300
  80. 2590 if f<> 1 then goto 1870
  81. 2620 goto 2440
  82. 2650 rem
  83. 2680 rem this is the update form
  84. 2710 rem
  85. 2740 f = 2 : rem set to form two
  86. 2770 poke 53280,5:poke 53281,7
  87. 2800 print "";"[147]";""
  88. 2830 print "            do you want to"
  89. 2860 print ""
  90. 2890 print "            add or delete  "
  91. 2920 print ""
  92. 2950 print "              abstracts?"
  93. 2980 print ""
  94. 3010 print ""
  95. 3040 print "        type 'a' - add"
  96. 3070 print "             'd' - delete"
  97. 3100 print "             'q' - quit"
  98. 3130 print  ""
  99. 3160 print "             -->[ ]<--";"[157][157][157][157][157]";
  100. 3190 gosub 1540
  101. 3220 if a$ = "q" then return
  102. 3250 if a$ = "a" then gosub 3460
  103. 3280 if a$ = "d" then gosub 4840
  104. 3310 if f <> 2 then goto 2740
  105. 3340 goto 3190
  106. 3370 rem
  107. 3400 rem this is the add form
  108. 3430 rem
  109. 3460 f = 3 : rem set to form three
  110. 3490 poke 53280,14:poke 53281,1
  111. 3520 print "";"[147]"
  112. 3550 if se=0 then goto 3610
  113. 3580 print "         re-enter abstract data[146]":goto 3640
  114. 3610 print "            add an abstract"
  115. 3640 print " abstract title  -                     [146]"
  116. 3670 print tab(19)"                    [146]"
  117. 3700 print " author          -                     [146]"
  118. 3730 print " document title  -                     [146]"
  119. 3760 print " abstract date   -                     [146]"
  120. 3790 print " abstract        -                     [146]"
  121. 3820 print tab(19)"                    [146]"
  122. 3850 print tab(19)"                    [146]"
  123. 3880 print tab(19)"                    [146]"
  124. 3910 print "   type 'return' - tab"
  125. 3940 print "             'p' - process"
  126. 3970 print "             'q' - quit"
  127. 4000 print "             -->[ ]<--"
  128. 4030 q=1: rem initialize field pointer
  129. 4060 gosub 700:rem - 1st field
  130. 4090 f1$=b$
  131. 4120 q=1+(1*4)
  132. 4150 gosub 700:rem - 2nd field
  133. 4180 f2$=b$
  134. 4210 q=1+(2*4)
  135. 4240 gosub 700:rem - 3rd field
  136. 4270 f3$=b$
  137. 4300 q=1+(3*4)
  138. 4330 gosub 700:rem - 4th field
  139. 4360 f4$=b$
  140. 4390 q=1+(4*4)
  141. 4420 gosub 700:rem - 5th field
  142. 4450 f5$=b$
  143. 4480 q=1+(5*4)
  144. 4510 gosub 700 :  rem - action field
  145. 4540 se=1
  146. 4570 if a$=chr$(13) then print chr$(146)" ";:goto 3520
  147. 4600 se=0
  148. 4630 if a$ = "p" then gosub 9460
  149. 4660 if a$ = "q" then return
  150. 4690 if f<> 3 then goto 3460
  151. 4720 goto 4480
  152. 4750 rem
  153. 4780 rem this is the delete form
  154. 4810 rem
  155. 4840 f = 5 : rem set to form five
  156. 4870 poke 53280,8:poke 53281,3
  157. 4900 print "";"[147]"
  158. 4930 print ""
  159. 4960 if se=0 then goto 5020
  160. 4990 print "          [144] re-enter delete data[146]":goto 5050
  161. 5020 print "          delete an abstract"
  162. 5050 print ""
  163. 5080 print " abstract title  -                     [146]"
  164. 5110 print tab(19)"                    [146]"
  165. 5140 print ""
  166. 5170 print "    type 'return' - tab"
  167. 5200 print "             'p' - process"
  168. 5230 print "             'q' - quit"
  169. 5260 print ""
  170. 5290 print "             -->[ ]<--"
  171. 5320 q=26: rem initialize field pointer
  172. 5350 gosub 700:rem - 1st field
  173. 5380 f1$=b$
  174. 5410 q=26+(1*4)
  175. 5440 gosub 700 : rem - action field
  176. 5470 se=1
  177. 5500 if a$=chr$(13) then print chr$(146)" ";:goto 4900
  178. 5530 se=0
  179. 5560 if a$ = "p" then gosub 14470
  180. 5590 if a$ = "q" then return
  181. 5620 if f<> 5 then goto 4840
  182. 5650 goto 5410
  183. 5680 rem
  184. 5710 rem this is the retrieve form
  185. 5740 rem
  186. 5770 f = 6 : rem set to form six
  187. 5800 poke 53280,5:poke 53281,1
  188. 5830 print "";"[147]";""
  189. 5860 if se=0 then goto 5920
  190. 5890 print "         re-enter retrieve data[146]":goto 5950
  191. 5920 print "          retrieve an abstract"
  192. 5950 print " enter abstract title, author's name,"
  193. 5980 print " both, or '*' in author field (to see"
  194. 6010 print " all authors and their abstracts)."
  195. 6040 print " enter up to three keywords and a '$' "
  196. 6070 print " in author for keyword search."
  197. 6100 print " title/keywords  -                     [146]"
  198. 6130 print tab(19)"                    [146]"
  199. 6160 print " author/*/$/    -                      [146]"
  200. 6190 print ""
  201. 6220 print "   type 'return' - tab"
  202. 6250 print "             'p' - print"
  203. 6280 print "             'v' - view"
  204. 6310 print "             'q' - quit"
  205. 6340 print "             -->[ ]<--"
  206. 6370 q=51
  207. 6400 gosub 700 : rem get 1st field
  208. 6430 f1$=b$
  209. 6460 q=51+(1*4)
  210. 6490 gosub 700 : rem get 2nd field
  211. 6520 f2$=b$
  212. 6550 q=51+(2*4)
  213. 6580 gosub 700 : rem get action field
  214. 6610 se=1
  215. 6640 if a$=chr$(13) then print chr$(146)" ";: goto 5830
  216. 6670 se=0
  217. 6700 if a$ = "p" or a$ = "v" then gosub 12250
  218. 6730 if a$ = "q" then return
  219. 6760 if f<> 6 then goto 5770
  220. 6790 goto 6550
  221. 6820 rem
  222. 6850 rem below are tables for managing the variable fields of the forms.
  223. 6880 rem each table contains the
  224. 6910 rem count of items in the data list, in sets of four, composed of
  225. 6940 rem start row/column, length and depth of field.
  226. 6970 rem
  227. 7000 data 3 : rem number of screen tables
  228. 7030 data 24,5,20,20,2,8,20,20,1,10,20,20,1,12,20,20,1,14,20,20,4,24
  229. 7060 data 18,1,1,8,12,20,20,2,23,18,1,1
  230. 7090 data 12,12,20,20,2,15,20,20,1,23,18,1,1
  231. 7120 rem
  232. 7150 rem author table full/empty checking and filling routine
  233. 7180 rem
  234. 7210 if ah$(1) <> "" then goto 7330 : rem if table is not empty, jump
  235. 7240 at = val(p2$)
  236. 7270 for x = 1 to at
  237. 7300 input#3, ah$(x): next
  238. 7330 return
  239. 7360 rem
  240. 7390 rem convert record pointer to binary
  241. 7420 rem
  242. 7450 r1=val(p1$):r2=0: if r>256then r2=int(r1/256):r1=r1-256*r2
  243. 7480 return
  244. 7510 rem
  245. 7540 rem this routine bumps "at", the author table pointer
  246. 7570 rem and puts the author and the pointer "pf$" in the table
  247. 7600 rem
  248. 7630 ah$(at) = f2$: at = at + 1
  249. 7660 ah$(at) = pf$: at = at + 1: ah$(at) = "zzz"
  250. 7690 return
  251. 7720 rem
  252. 7750 rem disk error print rouitne
  253. 7780 rem
  254. 7810 print"";
  255. 7840 print b$;"-'return' to abort   ";"[157][157]";
  256. 7870 gosub 1540
  257. 7900 if a$>=chr$(32) and a$<=chr$(95) then print "[157]";:goto 7870
  258. 7930 if a$<>chr$(13) then goto 7870
  259. 7960 close2:close3:close1:f=0:return
  260. 7990 rem
  261. 8020 rem disk err chnl read routine
  262. 8050 rem
  263. 8080 input#1,a,b$,c,d
  264. 8110 return
  265. 8140 rem
  266. 8170 rem garbage collection routine
  267. 8200 rem
  268. 8230 f1$="":f2$="":f3$="":f4$="":f5$="":u1$="":u2$="":u3$="":u4$="":u5$=""
  269. 8260 k1$(1)="":k1$(2)="":k1$(3)="":p1$="":p2$="":a$="":b$=""
  270. 8270 m=fre(0):return
  271. 8290 rem
  272. 8320 rem this rouitne bumps the temp abstract ptr by 1
  273. 8350 rem converts it to binary and does a seek of the abstract file
  274. 8380 rem
  275. 8410 tr=tr+1:p1$=str$(tr):gosub 7450
  276. 8440 print#1,"p" chr$(2)chr$(r1)chr$(r2)chr$(1):return
  277. 8470 rem
  278. 8500 rem get three keywords from screen and put in table
  279. 8530 rem
  280. 8560 k1$(1)="":k1$(2)="":k1$(3)=""
  281. 8590 kx=len(f1$):kl=1
  282. 8620 for kc = 1 to 3
  283. 8650 for kz = kl to kx
  284. 8680 if mid$(f1$,kz,1) <> " " then goto 8800
  285. 8710 if kz=1 then return
  286. 8740 k1$(kc) = mid$(f1$,kl,(kz-kl))
  287. 8770 kl = kz+1  : goto 8830
  288. 8800 next kz
  289. 8830 next kc
  290. 8860 return
  291. 8890 rem
  292. 8920 rem keyword search routine
  293. 8950 rem
  294. 8980 kl=1:sw=0
  295. 9010 kx=len(u5$)
  296. 9040 for kz=kl to kx
  297. 9070 if mid$(u5$,kz,1) <> " " then goto 9310
  298. 9100 for kq=1to3
  299. 9130 if k1$(kq)<>mid$(u5$,kl,(kz-kl)) then goto 9250
  300. 9160 m1$="":m2$="[146]"
  301. 9170 u5$=left$(u5$,kl-1)+m1$+mid$(u5$,kl,(kz-kl))+m2$+mid$(u5$,kz,(kx-kz))
  302. 9190 kz=kz+4:kx=kx+4:sw=1
  303. 9220 goto 9280
  304. 9250 next kq
  305. 9280 kl=kz+1
  306. 9310 next kz
  307. 9340 return
  308. 9370 rem *****************************
  309. 9400 rem * abstract file add routine *
  310. 9430 rem *****************************
  311. 9460 if left$(f1$,1)=" " or left$(f2$,1)=" " then f=0: return
  312. 9490 open 1,8,15 : rem open command channel
  313. 9520 open 2,8,2,"abstracts"
  314. 9550 gosub 7990
  315. 9580 if a<20 then goto 9940 : rem if file is here, o.k.
  316. 9610 if a=62 then goto 9760 : rem file absent, go create it
  317. 9640 gosub 7810:return
  318. 9670 rem
  319. 9700 rem it did not exist, so create it the first time
  320. 9730 rem
  321. 9760 close2: open 2,8,2, "abstracts,l,"+chr$(83)
  322. 9790 gosub 7990:if a<20 then goto 10240
  323. 9820 gosub 7810:return
  324. 9850 rem
  325. 9880 rem get pointer record
  326. 9910 rem
  327. 9940 print#1,"p" chr$(2)chr$(1)chr$(0)chr$(1)
  328. 9970 gosub 7990
  329. 10000 if a < 20 then input#2,p1$,p2$: goto 1024 0: rem get pointers
  330. 10030 gosub 7810:return : rem bad return
  331. 10060 rem
  332. 10090 rem we have to store and retrieve abstract in three parts.
  333. 10120 rem 1st is a record with title, author, magazine title.
  334. 10150 rem 2nd is magazine date. 3rd is abstrct only.
  335. 10170 rem we do this to get around the 88 character limit
  336. 10180 rem of the input statement.
  337. 10210 rem
  338. 10240 gosub 7450 : rem convert pointer p1$
  339. 10270 tr = val(p1$)
  340. 10300 print#1,"p" chr$(2)chr$(r1)chr$(r2)chr$(1)
  341. 10330 gosub 7990: if a<20 or a=50 then goto 10390
  342. 10360 gosub 7810:return
  343. 10390 print#2,f1$z$f2$z$f3$ : rem write title author and magazine title
  344. 10420 pf$=p1$ : rem set ptr for author table plug
  345. 10450 gosub 8410 : rem date
  346. 10480 gosub 7990: if a<20 or a=50 then goto 10540
  347. 10510 gosub 7810:return
  348. 10540 print#2, f4$ : rem write magazine date
  349. 10570 gosub 8410 : rem abstract
  350. 10600 gosub 7990 : if a<20 or a=50 then goto 10660
  351. 10630 gosub 7810:return
  352. 10660 print#2,f5$ : rem  finally write abstract!!!
  353. 10690 rem
  354. 10720 rem now load and update the author table
  355. 10750 rem
  356. 10780 open 3,8,3,"0:authors,s,r"
  357. 10810 gosub 7990 : rem is table there?
  358. 10840 if a = 62 then:close3:open 3,8,3,"0:authors,s,w":goto 10990
  359. 10870 goto 11260
  360. 10900 rem
  361. 10930 rem this is the first time author block filling routine
  362. 10960 rem
  363. 10990 at = val(p2$)
  364. 11020 gosub 7630 :rem go bump table pointers
  365. 11050 for x = 1 to at
  366. 11080 print#3,ah$(x): next
  367. 11110 gosub 7990 : if a > 20 then gosub 7810 : print#1,"s0:authors":return
  368. 11140 goto 11890
  369. 11170 rem
  370. 11200 rem this is the author table fill and update routine
  371. 11230 rem
  372. 11260 gosub 7210 : rem go see if author table is full, if not, fill it
  373. 11290 close3
  374. 11320 if at=500 then b$="author table full ":gosub 7810:return
  375. 11350 rem
  376. 11380 rem now find a spot in the table
  377. 11410 rem
  378. 11440 open 3,8,3, "@0:authors,s,w"
  379. 11470 gosub 7990: if a > 20 then gosub 7810 : return
  380. 11500 rem
  381. 11530 rem look for author, if hit, find end of pointers, shift everything
  382. 11560 rem right one slot, if no hit, then stick at end of table
  383. 11590 rem
  384. 11620 for y = 1 to at
  385. 11650 if f2$ = ah$(y) then y=y+1:goto 11740:rem if table end, fall through
  386. 11680 next
  387. 11710 gosub 7630 : goto 11830
  388. 11740 for x = (at+1) to y step -1 : rem shift stuff
  389. 11770 ah$(x) = ah$(x-1): next : rem right one slot
  390. 11800 ah$(y) = pf$: at = at +1
  391. 11830 for x = 1 to at
  392. 11860 print#3, ah$(x): next
  393. 11890 rem
  394. 11920 rem now update p1 and p2 , write them back and return
  395. 11950 rem
  396. 11980 print#1, "p"chr$(2)chr$(1)chr$(0)chr$(1)
  397. 12010 tr = tr + 1 : p1$ = str$(tr) : p2$ = str$(at)
  398. 12040 print#2,p1$z$p2$
  399. 12070 gosub 7990:if a>20 then gosub 7810
  400. 12100 gosub 8230  : rem do garbage collection
  401. 12130 f = 0:close2:close3:close1:return
  402. 12160 rem *****************************
  403. 12190 rem * abstract retrieve routine *
  404. 12220 rem *****************************
  405. 12250 open1,8,15
  406. 12280 open 2,8,2,"abstracts"
  407. 12310 gosub 7990
  408. 12340 if a > 20 then gosub 7810:return
  409. 12370 open 3,8,3,"0:authors,s,r"
  410. 12400 gosub 7990
  411. 12430 if a > 20 then gosub 7810:return
  412. 12460 c$=a$
  413. 12490 cd=1  : rem author only retrieve
  414. 12520 if f1$ = " " and f2$ = " " then goto 14320
  415. 12550 if f1$ <> " " and f2$ <> " " then cd = 2 : rem make same as code two
  416. 12580 if left$(f2$,1) = "$" then cd = 3 : gosub 8560 : rem keyword search
  417. 12610 if f1$ <> " " and f2$ = " " then cd = 2 : rem abstract only retrieve
  418. 12640 print#1,"p" chr$(2)chr$(1)chr$(0)chr$(1)
  419. 12670 gosub 7990
  420. 12700 if a >20 then gosub 7810:return
  421. 12730 input#2,p1$,p2$
  422. 12760 gosub 7210 :rem check/fill author table
  423. 12790 rem
  424. 12820 rem this is the author table hunt routine
  425. 12850 rem
  426. 12880 if left$(f2$,1)="*" or cd=3 or cd=2 then x=1:z=1:goto 13120
  427. 12910 for x = 1 to (at-1)
  428. 12940 if f2$ = ah$(x) then x = x + 1:goto 13120
  429. 12970 next
  430. 13000 goto 14350 : rem no hit, return to menu
  431. 13030 rem
  432. 13060 rem now go to the abstract file and get data and print
  433. 13090 rem
  434. 13120 for y = x to (at-1)
  435. 13150 p1$ = ah$(y)
  436. 13180 if left$(p1$,1)>"@" and z=1then 14290 :rem prnt all - skip names
  437. 13210 if left$(p1$,1)>"@" then 14350: rem jump if end of author pointers
  438. 13240 gosub 7450
  439. 13270 tr = val(p1$)
  440. 13300 print#1,"p" chr$(2)chr$(r1)chr$(r2)chr$(1)
  441. 13330 gosub 7990:if a > 20 then gosub 7810:return
  442. 13360 input#2,u1$,u2$,u3$     : rem get title author and magazine title
  443. 13390 gosub 8410
  444. 13420 if a>20 then gosub 7810:return
  445. 13450 input#2,u4$ : rem get date
  446. 13480 gosub 8410
  447. 13510 if a>20 then gosub 7810:return
  448. 13540 input#2,u5$ : rem get abstract
  449. 13570 if cd=3 then gosub 8980
  450. 13600 if sw <> 1 and cd = 3 goto 14290 : rem no keyword hit
  451. 13630 if cd=2 and u1$<>f1$ then 14290: rem does abstract match? jmp if no
  452. 13660 if c$ <> "v" then goto 14020
  453. 13690 print "[147][146]";
  454. 13720 print "abstract title[146]":print u1$
  455. 13750 print "author[146]":print u2$
  456. 13780 print "document title[146]":print u3$
  457. 13810 print "abstract date[146]":print u4$
  458. 13840 print "abstract[146]":print u5$
  459. 13870 print "more - y/n - ";:gosub1540
  460. 13900 if a$="n" then goto 14350
  461. 13930 if a$ <> "y" then print "[145]":goto 13870
  462. 13960 if cd=2 then goto 14320
  463. 13990 goto 14290
  464. 14020 open4,4
  465. 14050 print#4,"abstract title - ";u1$,chr$(10)
  466. 14080 print#4,"author         - ";u2$,chr$(10)
  467. 14110 print#4,"document title - ";u3$,chr$(10)
  468. 14140 print#4,"abstract date  - ";u4$,chr$(10)
  469. 14170 print#4,chr$(16) "36abstract",chr$(10),chr$(10)
  470. 14200 print#4,u5$,chr$(10),chr$(10),chr$(10)
  471. 14230 close4
  472. 14260 if cd=2 then goto 14320
  473. 14290 next
  474. 14320 gosub 8230  : rem do garbage collection
  475. 14350 f=0: z=0: sw=0 : close2:close3:close1:return
  476. 14380 rem ******************************
  477. 14410 rem * this is the delete routine *
  478. 14440 rem ******************************
  479. 14470 if left$(f1$,1) = " " then f=0: return
  480. 14500 open 1,8,15
  481. 14530 open 2,8,2,"abstracts"
  482. 14560 gosub 7990
  483. 14590 if a>20 then gosub 7810:return
  484. 14620 open3,8,3,"@0:authors,s,w"
  485. 14650 if a>20 then gosub 7810:return
  486. 14680 print#1,"p" chr$(2)chr$(1)chr$(0)chr$(1)
  487. 14710 gosub 7990
  488. 14740 if a>20 then gosub 7810:return
  489. 14770 input#2,p1$,p2$
  490. 14800 rem
  491. 14830 rem now retrieve all abstracts until the end or hit; if no hit exit.
  492. 14860 rem if hit, mark abstract title with high value. then go read
  493. 14890 rem author table and shrink table where pointer is to abstract file.
  494. 14920 rem
  495. 14950 ab = val(p1$)
  496. 14980 for x = 2 to (ab-3) step 3
  497. 15010 t1$ = str$(x):p1$=right$(t1$,len(t1$)-1)
  498. 15040 gosub 7450
  499. 15070 print#1,"p" chr$(2)chr$(r1)chr$(r2)chr$(1)
  500. 15100 gosub 7990:if a>20 then gosub 7810:return
  501. 15130 input#2,u1$,u2$,u3$
  502. 15160 if f1$<>u1$ then goto 15340
  503. 15190 f2$ = u2$ : u1$ = chr$(255) : rem mark deleted!!!!
  504. 15220 print#1,"p" chr$(2)chr$(r1)chr$(r2)chr$(1)
  505. 15250 gosub 7990:if a>20 then gosub 7810:return
  506. 15280 print#2,u1$z$u2$z$u3$
  507. 15310 goto 15400
  508. 15340 next
  509. 15370 goto 16150 : rem no hit, exit
  510. 15400 gosub 7210 : rem check/fill author table
  511. 15430 rem
  512. 15460 rem find author
  513. 15490 rem
  514. 15520 for x = 1 to (at-1)
  515. 15550 if f2$ = ah$(x) then x = x + 1 : goto 15640
  516. 15580 next
  517. 15610 goto 16150 : rem no hit, exit
  518. 15640 for y = x to (at-1)
  519. 15670 if left$(ah$(y),1)>"@" then 16150 : rem no hit for some reason
  520. 15700 if ah$(y) = p1$ then goto 15760
  521. 15730 next
  522. 15760 for q = y to (at-1) : rem shift table
  523. 15790 ah$(q) = ah$(q+1) : rem left one
  524. 15820 next
  525. 15850 at = at -1
  526. 15880 for x = 1 to at
  527. 15910 print#3,ah$(x):next
  528. 15940 rem
  529. 15970 rem now update p2$ and write it back to file
  530. 16000 rem
  531. 16030 print#1,"p" chr$(2)chr$(1)chr$(0)chr$(1)
  532. 16060 p2$ = str$(at):p1$=str$(ab)
  533. 16090 print#2,p1$z$p2$
  534. 16120 gosub 7990: if a>20 then gosub 7810
  535. 16150 gosub 8230  : rem do garbage collection
  536. 16180 f=0: close2:close3:close1:return
  537. 16210 rem ****************
  538. 16240 rem * help routine *
  539. 16270 rem ****************
  540. 16300 poke 53280,0:poke 53281,5
  541. 16330 print "[144]"
  542. 16360 print "[147]"
  543. 16390 print " personal library manager is used for"
  544. 16420 print " storing, retrieving, and deleting"
  545. 16450 print " information (ie. abstracts) on docu-"
  546. 16480 print " ments in a data base. minimun equip-"
  547. 16510 print " ment and software requirements are:"
  548. 16540 print "   - c64 commodore computer,"
  549. 16570 print "   - c1541 disk drive, or compatabile  "
  550. 16600 print "     unit,"
  551. 16630 print "   - video monitor,"
  552. 16660 print "   - and rom basic."
  553. 16690 print " optional equipment is an mps 801 "
  554. 16720 print " printer or compatabile unit."
  555. 16750 print "            continue - y/n - ";:gosub 1540
  556. 16780 if a$="n" then f=0:return
  557. 16810 if a$<>"y" then print "[145][145]":goto 16750
  558. 16840 print "[147]"
  559. 16870 print " to use this program, simply fill in"
  560. 16900 print " the blanks on the various screen forms"
  561. 16930 print " and give the form the appropriate"
  562. 16960 print " command.  here are some hints for"
  563. 16990 print " using the form commands:"
  564. 17020 print "   - 'q'uit always returns to the pre-"
  565. 17050 print "     vious form; at the greeting form"
  566. 17080 print "     it does a kernal cold start,"
  567. 17110 print "   - 'p'rocess makes the desired action"
  568. 17140 print "     take place,"
  569. 17170 print "   - 'v'iew shows on the monitor only,"
  570. 17200 print "   - 'p'rint shows on the printer only,"
  571. 17230 print "   - 'return' moves the cursor to the"
  572. 17260 print "     next field and places your data"
  573. 17290 print "     into the disk buffer.  at the "
  574. 17320 print "     action field, it moves the cur-"
  575. 17350 print "     sor back to the first data field,"
  576. 17380 print "   - 'del' deletes the last character,"
  577. 17410 print "   - and finally, changing an abstract"
  578. 17440 print "     can be effected by deleting then"
  579. 17470 print "     adding the desired document."
  580. 17500 print "            continue - y/n - ";:gosub 1540
  581. 17530 if a$="n" then f=0:return
  582. 17560 if a$<>"y" then print "[145][145]":goto 17500
  583. 17590 goto 16360
  584. 17950 end
  585.